import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from "@/views/login/Login.vue";
import Home from "@/views/home/Home.vue";
import Layout from "@/views/layout/Layout.vue";
import Account from "@/views/person/Account.vue";
import UpdatePassword from "@/views/person/UpdatePassword.vue";
import ColonyHouse from "@/views/basemanage/ColonyHouse.vue";
import Ranch from "@/views/basemanage/Ranch.vue";


Vue.use(VueRouter)

const routes = [
  {
    path:'/',
    redirect:'login'
  },
  {
    path: '/login',
    component:Login
  },
  {
    path: '/layout',
    redirect: '/home',
    component:Layout,
    children:[
      {
        path: '/home',
        component:Home
      },
      {
        path: '/account',
        component:Account
      },
      {
        path: '/updatePassword',
        component:UpdatePassword
      },
      {
        path: '/ColonyHouse',
        component:ColonyHouse
      },
      {
        path: '/ranch',
        component:Ranch
      }

    ]
  }
]

const router = new VueRouter({
  routes
})

export default router
